package main
import(
	"runtime"
	"fmt"
)

//cpu测试
func main(){
	//查看当前有几颗cpu
	cpuNum := runtime.NumCPU()
	fmt.Println(cpuNum)

	//自己设置使用几个cpu
	runtime.GOMAXPROCS(cpuNum - 1)
}
